package a.f.a;

import a.a.y;
import a.c.bb;
import a.c.q;
import a.c.x;
import a.f.mb;
import a.f.o;
import a.f.wc;

import java.awt.geom.Rectangle2D;

public class e
  extends mb
{
  o w;
  private y x;
  double y = 200.0D;
  int z = 30;
  boolean A = true;
  private double B;
  private double C = 5.0D;
  double D;
  private double[] E;
  double F;
  boolean G = false;
  private double H = 0.0D;
  private boolean I = false;
  private y J;
  private double K = 0.0D;
  public static boolean L;
  public static int M;
  
  public double a()
  {
    return this.K;
  }
  
  public void a(double paramDouble)
  {
    this.K = paramDouble;
  }
  
  double s()
  {
    return this.H;
  }
  
  void b(double paramDouble)
  {
    this.H = paramDouble;
  }
  
  public boolean t()
  {
    return this.G;
  }
  
  public void h(boolean paramBoolean)
  {
    this.G = paramBoolean;
    this.J = null;
  }
  
  public void a(int paramInt)
  {
    this.z = paramInt;
  }
  
  public int u()
  {
    return this.z;
  }
  
  public void c(double paramDouble)
  {
    if ((M != 0) || (paramDouble < 0.0D)) {
      paramDouble = 0.0D;
    }
    this.y = paramDouble;
  }
  
  public double v()
  {
    return this.y;
  }
  
  public void d(double paramDouble)
  {
    this.C = paramDouble;
  }
  
  public double w()
  {
    return this.C;
  }
  
  public void i(boolean paramBoolean)
  {
    this.A = paramBoolean;
  }
  
  public boolean x()
  {
    return this.A;
  }
  
  public void a(y paramy)
  {
    this.x = paramy;
    this.I = true;
  }
  
  public y y()
  {
    int i = M;
    if (i == 0) {
      if (this.I) {
        return this.x;
      }
    }
    if (i == 0) {
      if (this.J == null)
      {
        if (i == 0) {
          if (this.G)
          {
            if (i != 0) {
              break label76;
            }
            this.J = new a_();
            if (!L) {
              break label75;
            }
          }
        }
        this.J = new i();
      }
    }
    label75:
    label76:
    return this.J;
  }
  
  public double z()
  {
    return this.B;
  }
  
  public boolean b(o paramo)
  {
    return true;
  }
  
  public void a(o paramo)
  {
    int i = M;
    this.w = paramo;
    wc.a(paramo);
    y localy = y();
    if ((i != 0) || ((!this.I) && (this.G)))
    {
      localObject = wc.a(paramo, paramo.v());
      ((a_)localy).a(new a.d.w(((Rectangle2D)localObject).getCenterX(), ((Rectangle2D)localObject).getCenterY()));
    }
    Object localObject = localy.a(paramo);
    if (i == 0) {
      if (x())
      {
        a((a.c.w)localObject);
        if (i == 0)
        {
          if (this.D < this.C) {
            this.D = this.C;
          }
          this.B = a((a.c.w)localObject, this.D);
          if (i != 0) {}
        }
        else if (!L)
        {
          return;
        }
      }
      else
      {
        this.B = this.y;
      }
    }
    c((a.c.w)localObject, 0.0D);
  }
  
  double a(a.c.w paramw, double paramDouble)
  {
    int k = M;
    boolean bool = L;
    int i = paramw.k();
    double d1 = k.a(360.0D / i);
    a(paramw);
    double d4 = this.F / i;
    double d3 = this.F / 6.283185307179586D;
    if (k == 0)
    {
      if (d3 < paramDouble) {
        d3 = paramDouble;
      }
      paramw.h();
    }
    double d5 = this.K;
    if (k == 0) {
      if (this.E.length > 0) {
        d5 -= d1 / d4 * this.E[0] / 2.0D;
      }
    }
    int j = 0;
    do
    {
      if (j >= i) {
        break;
      }
      double d2 = d1 / d4 * this.E[j];
      d5 += d2 / 2.0D;
      double d6 = Math.cos(d5) * d3;
      double d7 = Math.sin(d5) * d3;
      if (k == 0)
      {
        if (bool) {
          break label226;
        }
        d5 += d2 / 2.0D;
        this.w.a(paramw.d(), d6, d7);
        j++;
        paramw.f();
      }
    } while (!bool);
    label226:
    return d3;
  }
  
  void c(a.c.w paramw, double paramDouble)
  {
    int i = M;
    boolean bool = L;
    double d1 = k.a(360.0D / paramw.k());
    double d2 = this.K;
    paramw.h();
    do
    {
      if (!paramw.e()) {
        break;
      }
      double d3 = Math.cos(d2) * this.y;
      double d4 = Math.sin(d2) * this.y;
      if (i == 0) {
        if (this.w == null) {
          this.w = ((o)paramw.d().g());
        }
      }
      this.w.a(paramw.d(), d3, d4);
      d2 += d1;
      paramw.f();
    } while (!bool);
  }
  
  double a(a.c.e parame)
  {
    double d1 = this.w.s(parame);
    double d2 = this.w.t(parame);
    if (M == 0) {}
    return d1 > d2 ? d1 : d2;
  }
  
  void a(a.c.w paramw)
  {
    boolean bool = L;
    this.F = 0.0D;
    this.E = new double[paramw.k()];
    this.D = 0.0D;
    paramw.h();
    int i = 0;
    do
    {
      if (i >= this.E.length) {
        break;
      }
      double d = a(paramw.d());
      this.E[i] = (d + this.z);
      this.D = Math.max(this.D, d);
      this.F += this.E[i];
      i++;
      paramw.f();
    } while (!bool);
  }
  
  class a_
    implements y
  {
    private a.d.w a = new a.d.w();
    
    a_() {}
    
    public a.d.w a()
    {
      return this.a;
    }
    
    public void a(a.d.w paramw)
    {
      this.a = paramw;
    }
    
    public a.c.w a(q paramq)
    {
      int i = e.M;
      boolean bool = e.L;
      if (i == 0) {
        if (!(paramq instanceof o)) {
          throw new IllegalArgumentException("This sequencer only works for LayoutGraphs");
        }
      }
      o localo = (o)paramq;
      bb localbb = new bb(localo.v());
      x localx = localo.B();
      double d1 = this.a.a();
      double d2 = this.a.b();
      a.c.w localw = localo.v();
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        double d3 = Math.atan2(localo.n(locale) - d2, localo.m(locale) - d1) - e.this.H;
        d3 = c.a(d3);
        localx.a(locale, d3);
        if (i != 0) {
          break label193;
        }
        localw.f();
        if (bool) {
          break label189;
        }
      } while (!bool);
      localbb.a(l.f(localx));
      if (i == 0) {
        localo.a(localx);
      }
      label189:
      label193:
      return localbb.l();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.a.e

 * JD-Core Version:    0.7.0.1

 */